﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using T3Task5;

namespace chaoshiguanli
{
    public partial class PassEx : Form
    {
        public PassEx()
        {
            InitializeComponent();
        }

        
        
        private void button1_Click(object sender, EventArgs e)
        {
            Employee employee; 
            bool result = false;
            bool resul = false;
            string pass = this.textBox1.Text;
            string sql = string.Format("select  *  from Super");
            SqlDataReader dr = DBHelper.Select(sql);
           
            while (dr.Read())
            {
                MessageBox.Show("密码正确！", "提示");
                this.Hide();
                employee.reusle = true;
                result = true;
                break;

            }
            //登陆失败   
            if (!result)
            {
                MessageBox.Show("密码错误！", "提示");
            }
        }
        public static void Ex(ref bool resul)
        {
            if (resul)
            {
                resul = true;
            }
            resul = false;
        }
    }
}
